package cn.ainit.fx.tbook;


import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.ainit.common.ReturnObject;

@Controller
@RequestMapping("/tbc")
public class TBookController {
	
	
	private TBookService tBookService;
	@Resource
	public void settBookService(TBookService tBookService) {
		this.tBookService = tBookService;
	}
	
	
	/****
	 * 生成套数信息
	 * @throws Exception
	 * @author chenfeifei
	 * @version 创建时间：2014-12-1 上午11:28:10
	 */
	@RequestMapping("/createTBookInfo")
	@ResponseBody
	public ReturnObject createTBookInfo(String djId,String dsId,String stationId,HttpServletResponse response,HttpServletRequest request,HttpSession session) throws Exception{
		ReturnObject returnObject=new ReturnObject();
		String msg="";
		try {
			msg=tBookService.createTBookInfo(djId, dsId, stationId, session);
			
		} catch (Exception e) {
			msg="生成套数信息有误";
			e.printStackTrace();
		}
		returnObject.setMsg(msg);
		return returnObject;
	}
	
	
	
}
